<template>
  <div>
    <el-pagination
      @size-change="_handleSizeChange"
      @current-change="_handleCurrentChange"
      :current-page="currentPage"
      :page-sizes="[10, 20, 30]"
      :page-size="size"
      layout="total, sizes, prev, pager, next, jumper"
      :total="total">
    </el-pagination>
  </div>
</template>
<script>
  export default {
    props:['currentPage','size','total'],
    name:'AppPagination',
    data(){
      return {

      }
    },
    methods:{
      _handleSizeChange(num){
        this.$emit('update:size',num)
        this.$emit('handleSizeChange')
      },
      _handleCurrentChange(num){
        this.$emit('update:currentPage',num)
        this.$emit('handleCurrentChange')
      },
    }
  }
</script>
<style scoped lang="scss">
  .el-pagination{
    float: right;
    margin-top: 20px;
  }
</style>
